<link rel="stylesheet" href="../static/css/style.css">
<link rel="stylesheet" href="../static/plugins/layui/css/layui.css">
<link rel="stylesheet" href="../static/plugins/bootstrap-3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="../static/plugins/bootstrap-3.3.7/css/bootstrap-theme.min.css">
<!-- 内容主体区域 -->
<div class="layui-row layui-pad15">
    <!--<form class="layui-form" action="">-->
    <div class="layui-col-md12 layui-col-lh  layui-addcont">
        <!--增加内容进来-->

        <!--案例-->
        <div class="layui-row layui-margin-bot2  this-child">
            <div class="layui-col-xs9">
                <div class="layui-form">
                    <select class="form-control" lay-ignore>
                        <option value="">所属供应商</option>
                        <option value="0">北京</option>
                        <option value="1">上海</option>
                        <option value="2">广州</option>
                        <option value="3">深圳</option>
                        <option value="4">杭州</option>
                    </select>
                </div>

            </div>
            <div class="layui-col-xs3 layui-text-center">
                <a href="javascript:;" class="layui-btn layui-btn-primary " onclick="relieveBind(this)">解绑</a>
            </div>
        </div>
        <!--案例-->


        <!--增加内容进来end-->
    </div>
    <div class="layui-col-md12   layui-margin-bot2">
        <a href="javascript:;" class="layui-btn  layui-zdy-bj  addWj">增加问卷</a>
    </div>
    <div class="layui-col-md12  layui-text-center layui-col-lh">
        <a href="javascript:;" class="layui-q-c layui-zdy-bj">确定</a>
    </div>
    <!--</form>-->


</div>
<script src="../static/js/jquery.min.js"></script>
<script src="../static/plugins/bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script src="../static/plugins/layui/layui.js"></script>
<script>
    //解除绑定start， 增加一个背景颜色
    function relieveBind(e) {

        e.classList.add('layui-zdy-bj');

    }
    //删除问卷end

    //Demo
    layui.use(['form','layer','jquery'], function(){
        var form = layui.form;
        var $ = layui.jquery;

        $(function () {
            // 增加问卷start
            $('.addWj').click(function () {

                var html ='';
                html +='<div class="layui-row layui-margin-bot2 this-child">';
                html +='<div class="layui-form" lay-filter="test1">';
                html +='<div class="layui-col-xs9">';
                html +='<select class="form-control"  lay-ignore>';
                html +='<option value="">' + '所属供应商' +'</option>';
                html +='<option value="1">' + '上海' +'</option>';
                html +='<option value="2">' + '广州' +'</option>';
                html +='<option value="3">' + '深圳' +'</option>';
                html +='</select>';
                html +='</div>';
                html +='</div>';
                html +='<div class="layui-col-xs3 layui-text-center">';
                html +='<a href="javascript:;" class="layui-btn layui-btn-primary"  onclick="relieveBind(this)">'+ '解绑' +'</a>';
                html +='</div>';
                html +='</div>';

                $('.layui-addcont').append(html);
                form.render(null, 'test1'); //局部在此刷新一下样式
            });
            // 增加问卷end
        });
    });
</script>


